﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using iShoppingBUS;
using iShoppingDTO;

namespace iShopping.Guest.UserControl
{
    public partial class SanPham : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack){

                List<SanPhamDTO> tb = SanPhamBUS.getTopByDate(5);
                DataList1.DataSource = tb;
                DataList1.DataBind();
            }
            for (int i = 0; i < DataList1.Items.Count; i++)
            {
                Label label = (Label)DataList1.Items[i].FindControl("Label1");
                label.Text = "00:00:00";
            }
        }
        protected void ImageButton1_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/Guest/LoginPage.aspx");
        }
    }
}